package com.xyd.springcloud.service;

import com.xyd.springcloud.mapper.UserMapper;
import com.xyd.springcloud.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public List<User> getAllUser() {
        return userMapper.selectAll();
    }

    public User userLogin(User user) {
        System.out.println("user=====" + user.getUserName());
        return userMapper.userLogin(user);
    }

    public UserMapper getUserMapper() {
        return userMapper;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
}
